<template>
	<view>
		<swiper class="swiper" vertical :display-multiple-items="4" :current='current' :duration="6000" circular
			easing-function='linear'>
			<swiper-item v-for="(item,index) in list" :key="index">
				<view class="swiper-item">
					<image :src="item" mode="aspectFill"></image>
				</view>
			</swiper-item>
		</swiper>
		<view class="login-m">
			<view class="start" v-if="!show">
				<view class="title">
					<image class="head-img"
						src="https://thirdwx.qlogo.cn/mmopen/vi_32/kHoDdV15McWrySeeaQt9UVzic6DJ2mrlic2WkqbaHVWrUVghF4CcY5iatKrQwqGbymY0KvqDRS0sKbmQ9HvLMyYNg/132?x-oss-process=image/resize,m_fixed,h_76,w_76"
						mode="widthFix"></image>
					<text class="username">
						您的好友 A00网络营销顾问-大建
					</text>
				</view>
				<view class="dec">
					邀请您登录，与40万学员一起来提升学历
				</view>
				<view class="phone-write">
					<input maxlength="13" focus placeholder="请输入手机号" class="set" placeholder-style="color:#fff;">
					<image
						src=""
						mode="widthFix" class="phone"></image>
				</view>
				<view class="btn" @click="show =! show">获取验证码</view>
			</view>
			<view class="next" v-else>
				<view class="next-title">已发送至手机17820251768</view>
				<view class="next-cat">
					换个手机号进入<uni-icons type="right" size="30" color="#fff"></uni-icons>
				</view>
				<view class="tost">
					<view class="time btn-captcha">
						重新获取验证码<uni-icons type="right" size="30" color="#fff"></uni-icons>
					</view>
				</view>
				<input id="valicode" type="number">
				<view class="agreement">
					<span>登录即视为同意</span>
					<text class="name">《远智教育用户服务协议》</text>
					<text class="name">《用户隐私协议》</text>
				</view>
				<view class="btn">注册</view>
			</view>
		</view>

	</view>

</template>

<script>
	export default {
		data() {
			return {
				current: 0,
				list: ['https://zm.yzou.cn/static/images/c209338384f185d43c6a..png',
					'https://zm.yzou.cn/static/images/c209338384f185d43c6a..png',
					'https://zm.yzou.cn/static/images/c209338384f185d43c6a..png',
					'https://zm.yzou.cn/static/images/c209338384f185d43c6a..png',
					'https://zm.yzou.cn/static/images/c209338384f185d43c6a..png',
					'https://zm.yzou.cn/static/images/c209338384f185d43c6a..png',
					'https://zm.yzou.cn/static/images/c209338384f185d43c6a..png',
					'https://zm.yzou.cn/static/images/c209338384f185d43c6a..png'
				],
				show: true
			}
		},
		onLoad() {
			this.current += 1
			setInterval(() => {
				if (this.current < this.list.length - 1) {
					this.current += 1
				} else {
					this.current = 0
				}
			}, 6000)
		},
		methods: {}
	}
</script>

<style scoped lang="scss">
	.login-m {
		padding: 40rpx;
	}

	.start {

		.title {
			align-items: center;
			color: #fff;
			display: flex;
			font-size: 40rpx;
			font-weight: 600;

			.head-img {
				border-radius: 50%;
				height: 50rpx;
				margin-right: 10rpx;
				width: 50rpx;

			}
		}

		.dec {
			color: #fff;
			margin-top: 10rpx;
			font-size: 28rpx;
		}

		.phone-write {
			position: relative;
			margin-top: 240rpx;

			input {
				width: 100%;
				height: 80rpx;
				border-radius: 80rpx;
				background: hsla(0, 0%, 100%, .4);
				border: 1px solid #fff;
				color: #fff;
				font-family: PingFangSC-Semibold, PingFang SC;
				font-size: 28rpx;
				padding-left: 80rpx;
			}

			.phone {
				position: absolute;
				left: 10rpx;
				width: 70rpx;
				top: 50%;
				transform: translateY(-50%);
			}
		}



	}

	.next {
		.next-title {
			font-size: 40rpx;
			font-weight: 600;
			color: #fff;
		}

		.next-cat {
			color: #fff;
			font-weight: 400;
			margin-top: 20rpx;
		}

		.tost {
			margin-top: 80px;

			.btn-captcha {
				color: #fff;
			}
		}

		#valicode {
			border-bottom: 1px solid #fff;
			color: #fff;
			width: 100%;
			height: 80rpx;
			margin-top: 40rpx;
		}

		.agreement {
			color: #fff;
			font-family: PingFangSC-Regular, PingFang SC;
			font-size: 24rpx;
			font-weight: 400;
			margin-bottom: 20rpx;
			margin-top: 40rpx;

			text {
				color: #f06e6c
			}
		}
	}

	.btn {
		background: #f06e6c;
		border-radius: 80rpx;
		color: #fff;
		font-family: PingFangSC-Semibold, PingFang SC;
		font-size: 32rpx;
		font-weight: 600;
		height: 80rpx;
		line-height: 80rpx;
		text-align: center;
		width: 100%;
		margin-top: 40rpx;
	}

	.swiper {
		position: fixed;
		z-index: -1;
		left: 0;
		top: 0;
		width: 100%;
		filter: brightness(0.5);
		height: 100vh;

		.swiper-item {
			width: 100%;
			height: calc(100vh / 4);

			image {
				width: 100%;
				height: calc(100vh / 4);
			}
		}
	}
</style>